﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'PRC_TB_USER_UP')
	BEGIN
		DROP  Procedure  dbo.PRC_TB_USER_UP
	END

GO

CREATE PROCEDURE [dbo].[PRC_TB_USER_UP] 
(
    @TU_ID Integer,
    @TU_NAME Varchar(150),
    @TU_LOGIN Varchar(20),
    @TU_PASSWORD Varchar(50),
    @TU_PROFILER_ID Integer,
    @TU_GROUP_ID Integer,
    @TU_EMAIL varchar(250)
)
AS
	UPDATE TB_USER
	Set 
	TU_NAME = @TU_NAME,
	TU_LOGIN = @TU_LOGIN,
	TU_PASSWORD = @TU_PASSWORD,
	TU_PROFILER_ID = @TU_PROFILER_ID,
	TU_GROUP_ID = @TU_GROUP_ID,
	TU_FIRST_ACCESS = TU_FIRST_ACCESS,
	TU_EMAIL = @TU_EMAIL
	WHERE TU_ID = @TU_ID


GO

GRANT EXEC ON dbo.PRC_TB_USER_UP TO PUBLIC

GO

